using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Domains
{
    /// <summary>
    /// <para>Domain To Table</para>
    /// <para>Creates a table from an attribute domain.</para>
    /// <para>从属性域创建表。</para>
    /// </summary>    
    [DisplayName("Domain To Table")]
    public class DomainToTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DomainToTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Input Workspace</para>
        /// <para>The workspace containing the attribute domain to be converted to a table.</para>
        /// <para>包含要转换为表的属性域的工作空间。</para>
        /// </param>
        /// <param name="_domain_name">
        /// <para>Domain Name</para>
        /// <para>The name of the existing attribute domain.</para>
        /// <para>现有属性域的名称。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// </param>
        /// <param name="_code_field">
        /// <para>Code Field</para>
        /// <para>The name of the field in the created table that will store code values.</para>
        /// <para>创建的表中将存储代码值的字段的名称。</para>
        /// </param>
        /// <param name="_description_field">
        /// <para>Field Description</para>
        /// <para>The name of the field in the created table that will store code value descriptions.</para>
        /// <para>创建的表中将存储代码值说明的字段的名称。</para>
        /// </param>
        public DomainToTable(object _in_workspace, object _domain_name, object _out_table, object _code_field, object _description_field)
        {
            this._in_workspace = _in_workspace;
            this._domain_name = _domain_name;
            this._out_table = _out_table;
            this._code_field = _code_field;
            this._description_field = _description_field;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Domain To Table";

        public override string CallName => "management.DomainToTable";

        public override List<string> AcceptEnvironments => ["autoCommit", "configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_workspace, _domain_name, _out_table, _code_field, _description_field, _configuration_keyword];

        /// <summary>
        /// <para>Input Workspace</para>
        /// <para>The workspace containing the attribute domain to be converted to a table.</para>
        /// <para>包含要转换为表的属性域的工作空间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Domain Name</para>
        /// <para>The name of the existing attribute domain.</para>
        /// <para>现有属性域的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Domain Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _domain_name { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para>The table to be created.</para>
        /// <para>要创建的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Code Field</para>
        /// <para>The name of the field in the created table that will store code values.</para>
        /// <para>创建的表中将存储代码值的字段的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Code Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _code_field { get; set; }


        /// <summary>
        /// <para>Field Description</para>
        /// <para>The name of the field in the created table that will store code value descriptions.</para>
        /// <para>创建的表中将存储代码值说明的字段的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Description")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _description_field { get; set; }


        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>For geodatabase tables, the custom storage keywords for creating the table.</para>
        /// <para>对于地理数据库表，用于创建表的自定义存储关键字。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _configuration_keyword { get; set; } = null;


        public DomainToTable SetEnv(int? autoCommit = null, object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}